{{- range $cr := .Values.cephCsi.internal.crs }}
  {{- if $cr.spec.cephfs }}
    {{- range $sc := $cr.spec.cephfs.storageClasses }}
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: {{ $cr.name }}-{{ $sc.namePostfix }}
  namespace: d8-{{ $.Chart.Name }}
  annotations:
    migration-volume-binding-mode-changed: ""
{{ include "helm_lib_module_labels" (list $ (dict "app" $.Chart.Name)) | indent 2 }}
provisioner: cephfs.csi.ceph.com
reclaimPolicy: {{ $sc.reclaimPolicy }}
      {{- if $sc.allowVolumeExpansion }}
allowVolumeExpansion: {{ $sc.allowVolumeExpansion }}
      {{- end }}
      {{- if $sc.mountOptions }}
mountOptions:
        {{- range $option := $sc.mountOptions }}
  - {{ $option }}
        {{- end }}
      {{- end }}
volumeBindingMode: WaitForFirstConsumer
parameters:
  csi.storage.k8s.io/provisioner-secret-name: csi-{{ $cr.name }}
  csi.storage.k8s.io/provisioner-secret-namespace: d8-{{ $.Chart.Name }}
  csi.storage.k8s.io/controller-expand-secret-name: csi-{{ $cr.name }}
  csi.storage.k8s.io/controller-expand-secret-namespace: d8-{{ $.Chart.Name }}
  csi.storage.k8s.io/node-stage-secret-name: csi-{{ $cr.name }}
  csi.storage.k8s.io/node-stage-secret-namespace: d8-{{ $.Chart.Name }}
  clusterID: {{ $cr.spec.clusterID }}
  fsName: {{ $sc.fsName }}
  pool: {{ $sc.pool }}
    {{- end }}
  {{- end }}
{{- end }}
